<?php
/**
 * Created by PhpStorm.
 * User: Liu
 * Date: 2022/6/7
 * Time: 10:53
 */

namespace app\admin\validate;

use think\Validate;

class SeoLink extends Validate {
    protected $regex = [
        'seo_link' => '/^[0-9a-zA-Z_-]+$/'
    ];

    protected $rule = [
        'seo_link|URL名称' => 'regex:seo_link'
    ];

    protected $message = [
        'seo_link.regex' => 'URL名称只允许输入字母、数字、 - 和 _ ',
    ];
}